#ifndef __WRITE_LOG_
#define __WRITE_LOG_

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <assert.h>
#include <string.h>
#include <string>
#include <fcntl.h>
#include <stdarg.h>
enum switch_mode  
{  
    mode_minute,  
    mode_hour,  
    mode_day,  
    mode_month  
}; 
void write_cmd(const char *fmt,...);
int write_log(const char *msg, ...);
int log_file(switch_mode mode = mode_day);
void close_file();
#endif
